﻿using System;
using SqlSugar;

namespace PLM.ConfigurationCenter.Model {
    /// <summary>
    /// 
    /// </summary>
    [SugarTable("Record")]
    public class RecordModel {
        public RecordModel() { }

        public RecordModel(TaskModel model) {
            DataBase = model.DataBase;
            TaskId = model.UuId;
            DataBaseType = model.DataBaseType;
            ExecuteTime = DateTime.Now;
            ServerAddress = model.ServerAddress;
            UuId = Guid.NewGuid().ToString("N");
        }
        /// <summary>
        /// 标识
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public string UuId { get; set; }
        /// <summary>
        /// 任务主键
        /// </summary>
        public string TaskId { get; set; }
        /// <summary>
        /// 服务器地址
        /// </summary>
        public string ServerAddress { get; set; }
        /// <summary>
        /// 数据库
        /// </summary>
        public string DataBase { get; set; }
        /// <summary>
        /// 数据库类型
        /// </summary>
        public int DataBaseType { get; set; }
        /// <summary>
        /// 执行时间
        /// </summary>
        public DateTime ExecuteTime { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime StartTime { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 存储位置
        /// </summary>
        public string FilePath { get; set; }
        /// <summary>
        /// 执行状态
        /// </summary>
        public bool ExecuteSatus { get; set; }
        /// <summary>
        /// 执行状态
        /// </summary>
        public string Remark { get; set; }
    }
}
